package com.paranoidvulture.javaEngine.MapLayers;

import java.awt.Color;
import java.awt.Image;
import java.awt.geom.Rectangle2D;
import java.awt.geom.Rectangle2D.Double;

public class TileCell {
	private int tileWidth = 64;
	private int tileHeight = 64;
	private Image tile;
	private Color curColor;
	private Rectangle2D rec;
	private float posX, posY;
	private boolean hasImage, selected;
	
	public float getPosX() {
		return posX;
	}
	public boolean isSelected() {
		return selected;
	}
	public void setSelected(boolean selected) {
		this.selected = selected;
	}
	public void setPosX(float posX) {
		this.posX = posX;
	}
	public float getPosY() {
		return posY;
	}
	public void setPosY(float posY) {
		this.posY = posY;
	}
	public Rectangle2D getRec() {
		return rec;
	}
	public void setRec(Rectangle2D rec) {
		this.rec = rec;
	}
	public int getTileWidth() {
		return tileWidth;
	}
	public void setTileWidth(int tileWidth) {
		this.tileWidth = tileWidth;
	}
	public int getTileHeight() {
		return tileHeight;
	}
	public void setTileHeight(int tileHeight) {
		this.tileHeight = tileHeight;
	}
	public Image getTile() {
		return tile;
	}
	public void setTile(Image tile) {
		this.hasImage = true;
		this.tile = tile;
	}
	
	public boolean isBlank() {
		return hasImage;
	}
	
	public Color getCurColor() {
		return curColor;
	}
	public void setCurColor(Color curColor) {
		this.curColor = curColor;
	}
	
	public void setPostion(int x, int y) {
		this.posX = x;
		this.posY = y;
	}
	
	public void setPostion(float x, float y) {
		this.posX = x;
		this.posY = y;
	}
	
	public void init(float x, float y) {
		this.hasImage = false;
		this.setPostion(x, y);
		rec = new Rectangle2D.Double(this.posX, this.posY, this.tileWidth, this.tileHeight);
	}
}
